const FormatSpaceString = require('../common/FormatSpaceString');

class Todo {
    constructor(obj) {
        this.title = obj.title;
        this.description = obj.description;
        this.deadline = obj.deadline;
    }

    check() {
        let flag;
        let title = new FormatSpaceString(this, 'title', false, false, null, null, null, 100);
        flag = title.check();
        if (!flag.success) {
            return flag;
        }
        return { success: true };
    }
}

module.exports = Todo;